//Created by: Sean Yow

Ext.define("MajorProjectSenchaTouch.view.ExamPaperModule.ExamSearch",{
    extend: 'Ext.Container',
    id: 'exambasecon',
    xtype: 'examsearch',
    requires:[
    'MajorProjectSenchaTouch.view.ExamPaperModule.FirstFilter',
    'MajorProjectSenchaTouch.view.ExamPaperModule.SecondFilter',
    'MajorProjectSenchaTouch.view.ExamPaperModule.ThirdFilter'
    ],
    config:{
        scrollable:true,
        style: 'background-color: #343433',
        cls: 'backgroundRightArrowPanel',
        styleHtmlContent: true,
        layout:{
		  fullscreen: true,
          type: 'vbox'  
        },
        items: [
		{
			xtype:'button',
			id:'exLogout0',
			text:'Log Out',
			action:'examLogout'
		},
		{
                    xtype: 'panel',
                    items:[{
                        xtype: 'panel',
                        id: 'seaBtnDisplay',
                        items:[
                        {
                            xtype: 'button',
                            pressedCls:'rsBtnClicked',
                            id:'colBtn1',
                            iconCls: 'arrow_up',
                            iconMask:true,
                            handler: function(){
                                var minButton = Ext.getCmp('colBtn1');
                                var checkoc = minButton.getIconCls();
                                if(checkoc == 'arrow_up')
                                {
                                    minButton.setIconCls('arrow_down')
                                    Ext.getCmp('exLogout0').hide();
                                }
                                else
                                {
                                    minButton.setIconCls('arrow_up')
                                    Ext.getCmp('exLogout0').show();
                                }
                            }  
                        }]
                    }]
                },
        {
            xtype: 'panel',
            cls: 'advaPanel',
            items: [
            {
                xtype: 'firstExamfilter'
            },
            {
                xtype: 'secondExamfilter'
            },
            {
                xtype: 'thirdExamfilter'
            },
            ]
        },
        {
            xtype: 'button',
            id:'examSearchSubmit',
            text: 'Search!',
            height: '2.5em',
            action: 'goSearchExamResult',
            docked: 'bottom'
        },
        ]
    }
});